<%@page import="javax.sound.midi.MidiDevice.Info"%>
<%@page import="java.util.ArrayList"%>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.finple.DBConnection"%>
<%@ page import="com.finple.MeetingInfoVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%
	String id = request.getParameter("id");
	System.out.println(id);
%>
</head>
<body>
	<form class="form-container" action="/Finple/index.jsp" method="post">
		<div class="form-contain" align="center">
			<div id="header">
				<div id="title">
					<h2 align="center">
						<font color="#8B5927">Table View</font>
					</h2>
				</div>
			</div>
			<p>
				Link : <a href="http://203.237.183.109/Finple/data/tableview.jsp?id=<%=id%>">http://203.237.183.109/Finple/<%=id%></a>
			</p>
			<div align="center">
				<%
					MeetingInfoVo info = DBConnection.GetInst().getMeetingData(id);

					if (info != null) {
				%>
				<div class="fixedContent " id="pollInfos" style="background-color: rgb(240, 240, 240);">
					<h2 style="margin: 0px; padding: 0px; font-family: Arial, sans-serif; font-weight: bold; line-height: 35px; color: rgb(50, 50, 50); font-size: 27px; clear: both; text-align: left; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><%=info.getTitle()%></h2>
					<div style="margin: 0px; padding: 6px 0px 0px; font-size: 13px; line-height: 20px; color: rgb(111, 111, 111); clear: both; font-family: Arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240);">
						<div style="margin: 0px; padding: 0px 5px 0px 0px; float: left; display: block;">
							Poll initiated by
							<%=info.getInitiatorAlias()%></div>
						<span style="margin: 0px; padding: 0px 5px; float: left; display: block;"> | </span>
						<div style="margin: 0px; padding: 0px 5px; float: left; display: block;" title="0 participants">
							<span style="margin: 0px; padding: 0px; float: left;"> 0 </span>
						</div>
						<span style="margin: 0px; padding: 0px 5px; float: left; display: block;"> | </span>
						<div style="margin: 0px; padding: 0px 5px; float: left; display: block;" title="0 Comments">
							<span style="margin: 0px; padding: 0px; float: left;"> 0 </span>
						</div>
						<span style="margin: 0px; padding: 0px 5px; float: left; display: block;"> | </span>
						<div style="margin: 0px; padding: 0px 5px; float: left; display: block;" title="Latest activity">
							<span style="margin: 0px; padding: 0px; float: left;"> one minute ago </span>
						</div>
					</div>
					<div style="margin: 0px; padding: 3px 0px 0px; font-size: 15px; clear: both; color: rgb(50, 50, 50); font-family: Arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240);">
						<div style="margin: 0px 0px 0px -20px; padding: 0px;">
							<div style="margin: 0px 0px 0px 20px; padding: 0px; float: left; min-height: 1px; width: auto;">
								Where: <a href="http://maps.google.com/maps?q=<%=info.getLocation()%>" style="margin: 0px; padding: 0px; color: rgb(0, 102, 221); text-decoration: none; cursor: pointer;" target="_blank"> <%=info.getLocation()%>
								</a>
							</div>
						</div>
					</div>
					<div style="margin: 0px; padding: 3px 0px 0px; font-size: 15px; clear: both; color: rgb(50, 50, 50); font-family: Arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240);">
						<div style="margin: 0px 0px 0px -20px; padding: 0px;">
							<div style="margin: 0px 0px 0px 20px; padding: 0px; float: left; min-height: 1px; width: auto;">
								Description:
								<%=info.getDescription()%></div>
						</div>
					</div>
					<div style="margin: 0px; padding: 22px 0px 0px; clear: both; font-size: 15px; line-height: 20px; color: rgb(50, 50, 50); font-family: Arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(240, 240, 240);"></div>
				</div>
				<%
					}
				%>
				<!-- poll table 시작 -->
				<%
					ArrayList<String> timeSet = DBConnection.GetInst().getTimeData("0");
					if (timeSet.size() > 0) {
				%>
				<div id="ptContainer">
					<table border="1" cellpadding="0" cellspacing="0" class="poll  " summary="1111">
						<tbody>
							<tr class="header time">
								<!--<th class="nonHeader partCount boldText">
									<div>0 participants</div>
								</th> -->
								<%
									for (String timeStr : timeSet) {
								%>
								<th class="dsep" colspan="1">
									<div>
										<%=timeStr%>
									</div>
								</th>
								<%
									}
								%>
							</tr>
							<tr></tr>
							<!-- 
							<tr class="participation twoLevel partMyself">
								<td class="pname">
									<div style="width: 182px">
										<div class="avatarSmall" style="background-image: url('/builtstatic/1370425967/doodle/graphics/common/avatar.png')"></div>
										<label class="hiddenAcc" for="pname" title="l10n_yourName"></label> <input class="inputText" id="pname" maxlength="64" name="name" placeholder="Your name.." type="text" value="">
									</div>
								</td>
								<td class="dsep y" data="0" id="box0" title="Monday, June 10, 2013 9:30 AM - 1:15 PM"><label class="hiddenAcc" for="option0"></label> <input id="option0" name="p" type="checkbox" checked="checked"></td>
								<td class="y" data="1" id="box1" title="Tuesday, June 11, 2013 9:30 AM - 1:15 PM"><label class="hiddenAcc" for="option1"></label> <input id="option1" name="p" type="checkbox" checked="checked"></td>
							</tr>
							 -->
						</tbody>
					</table>
				</div>
				<%
					}
				%>
			</div>
		</div>
		<div>
			<div class="submit-container">
				<button type="submit" class="btn btn-success">Finish</button>
			</div>
		</div>
		</div>
	</form>
</body>
</html>